import java.util.Scanner;

public class Demo06 {
    public static void main(String[] args) {
        int value1 = 10;
        if (value1 >= 10) {
            System.out.println("value1大于等于10");
        }
        System.out.println("恭喜你及格了");

        // String s1 = "hello";
        // String s2 = "HELLO".toLowerCase();
        // System.out.println(s1);
        // System.out.println(s2);
        // if (s1 == s2) {
        // System.out.println("s1 == s2");
        // } else {
        // System.out.println("s1 != s2");
        // }

        String s1 = "hello";
        String s2 = "HELLO".toLowerCase();
        System.out.println(s1);
        System.out.println(s2);
        if (s1.equals(s2)) {
            System.out.println("s1 equals s2");
        } else {
            System.out.println("s1 not equals s2");
        }

        /*
         * 练习
         * 请用if ... else编写一个程序，用于计算体质指数BMI，并打印结果。
         * BMI = 体重(kg) / 身高(m)的平方
         */
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入体重(kg)：");
        double weight = scanner.nextDouble();
        System.out.print("请输入身高(m)：");
        double height = scanner.nextDouble();
        double bmi = weight / (height * height);
        System.out.printf("BMI = %.2f\n", bmi);
        if (bmi < 18.5) {
            System.out.println("过轻");
        } else if (bmi >= 18.5 && bmi < 25) {
            System.out.println("正常");
        } else if (bmi >= 25 && bmi < 28) {
            System.out.println("过重");
        } else if (bmi >= 28 && bmi <= 32) {
            System.out.println("肥胖");
        } else {
            System.out.println("严重肥胖");

        }
    }
}
